home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / pswdprot / configur.frm < prev    next >
Text File  |  1995-05-07  |  6KB  |  208 lines

  1. VERSION 2.00
  2. Begin Form Configure 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Configure"
  5.    ClientHeight    =   4065
  6.    ClientLeft      =   4245
  7.    ClientTop       =   3375
  8.    ClientWidth     =   3705
  9.    Height          =   4470
  10.    Left            =   4185
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4065
  13.    ScaleWidth      =   3705
  14.    Top             =   3030
  15.    Width           =   3825
  16.    Begin SSPanel Panel3D6 
  17.       BackColor       =   &H00C0C0C0&
  18.       BevelOuter      =   1  'Inset
  19.       Caption         =   "Time Interval"
  20.       Font3D          =   0  'None
  21.       Height          =   252
  22.       Left            =   480
  23.       TabIndex        =   11
  24.       Top             =   480
  25.       Width           =   1452
  26.    End
  27.    Begin TextBox Time_set 
  28.       BackColor       =   &H00C0C0C0&
  29.       Height          =   288
  30.       Left            =   2040
  31.       TabIndex        =   10
  32.       Top             =   480
  33.       Width           =   612
  34.    End
  35.    Begin SpinButton Spin1 
  36.       Height          =   252
  37.       Left            =   2640
  38.       Top             =   480
  39.       Width           =   372
  40.    End
  41.    Begin SSPanel Panel3D5 
  42.       BackColor       =   &H00C0C0C0&
  43.       BevelOuter      =   1  'Inset
  44.       Font3D          =   0  'None
  45.       Height          =   492
  46.       Left            =   360
  47.       TabIndex        =   9
  48.       Top             =   360
  49.       Width           =   2892
  50.    End
  51.    Begin SSCommand Command3D5 
  52.       Caption         =   "Set Password..."
  53.       Enabled         =   0   'False
  54.       Font3D          =   0  'None
  55.       Height          =   372
  56.       Left            =   720
  57.       TabIndex        =   8
  58.       Top             =   1560
  59.       Width           =   2172
  60.    End
  61.    Begin SSCheck Check3D1 
  62.       Caption         =   "Password Protected"
  63.       Font3D          =   0  'None
  64.       Height          =   252
  65.       Left            =   840
  66.       TabIndex        =   7
  67.       Top             =   1200
  68.       Width           =   1932
  69.    End
  70.    Begin SSCommand Command3D4 
  71.       Caption         =   "About..."
  72.       Font3D          =   0  'None
  73.       Height          =   492
  74.       Left            =   1920
  75.       TabIndex        =   6
  76.       Top             =   3000
  77.       Width           =   972
  78.    End
  79.    Begin SSCommand Command3D3 
  80.       Caption         =   "Help..."
  81.       Font3D          =   0  'None
  82.       Height          =   492
  83.       Left            =   720
  84.       TabIndex        =   5
  85.       Top             =   3000
  86.       Width           =   972
  87.    End
  88.    Begin SSCommand Command3D2 
  89.       Caption         =   "Cancel"
  90.       Font3D          =   0  'None
  91.       Height          =   492
  92.       Left            =   1920
  93.       TabIndex        =   4
  94.       Top             =   2400
  95.       Width           =   972
  96.    End
  97.    Begin SSCommand Command3D1 
  98.       Caption         =   "OK"
  99.       Font3D          =   0  'None
  100.       Height          =   492
  101.       Left            =   720
  102.       TabIndex        =   3
  103.       Top             =   2400
  104.       Width           =   972
  105.    End
  106.    Begin SSPanel Panel3D3 
  107.       BackColor       =   &H00C0C0C0&
  108.       BevelOuter      =   1  'Inset
  109.       Font3D          =   0  'None
  110.       Height          =   1332
  111.       Left            =   360
  112.       TabIndex        =   2
  113.       Top             =   2280
  114.       Width           =   2892
  115.    End
  116.    Begin SSPanel Panel3D2 
  117.       BackColor       =   &H00C0C0C0&
  118.       BevelOuter      =   1  'Inset
  119.       Font3D          =   0  'None
  120.       Height          =   972
  121.       Left            =   360
  122.       TabIndex        =   1
  123.       Top             =   1080
  124.       Width           =   2892
  125.    End
  126.    Begin SSFrame Frame3D1 
  127.       Font3D          =   0  'None
  128.       Height          =   3735
  129.       Left            =   120
  130.       TabIndex        =   0
  131.       Top             =   120
  132.       Width           =   3375
  133.    End
  134. End
  135.  
  136. Sub Check3D1_Click (Value As Integer)
  137. If (Value = -1) Then
  138.     command3d5.Enabled = True
  139. Else
  140.     command3d5.Enabled = False
  141. End If
  142. End Sub
  143.  
  144. Sub Command3D1_Click ()
  145. If (Val(time_set.Text) < 1) Then
  146.    time_set.Text = "1"
  147. End If
  148.  
  149. A$ = "N"
  150. If (CHECK3D1.Value = True) Then
  151.     A$ = "Y"
  152. End If
  153.  
  154. 'Write the directory of the Bit Maps
  155. RESULT% = WritePrivateProfileString("PWSAMPLE", "PWProtected", A$, "CONTROL.INI")
  156. RESULT% = WritePrivateProfileString("PWSAMPLE", "Timer Set", time_set.Text, "CONTROL.INI")
  157. End
  158. End Sub
  159.  
  160. Sub Command3D2_Click ()
  161. End
  162. End Sub
  163.  
  164. Sub Command3D3_Click ()
  165. 'HelpFilePath = "D:\PROGRAM\VB\PROJECTS\SCRNSVR\GIFSVR\SCRNSVR.HLP"
  166. 'R = WinHelp(Configure.hWnd, HelpFilePath, HELP_CONTENTS, 0)
  167. End Sub
  168.  
  169. Sub Command3D4_Click ()
  170. aboutbox.Show
  171. End Sub
  172.  
  173. Sub Command3D5_Click ()
  174. ChngPswdInst = Shell("C:\WINDOWS\SYSTEM\CHGPSWD.EXE")
  175. End Sub
  176.  
  177. Sub Form_Load ()
  178. A$ = Space$(50)
  179. RESULT% = GetPrivateProfileString("PWSAMPLE", "PWProtected", "N", A$, 50, "CONTROL.INI")
  180. If (Mid$(A$, 1, 1) = "Y") Then
  181.     CHECK3D1.Value = True
  182. End If
  183. If (CHECK3D1.Value = True) Then
  184.     command3d5.Enabled = True
  185. Else
  186.     command3d5.Enabled = False
  187. End If
  188.  
  189. A$ = Space$(3)
  190. RESULT% = GetPrivateProfileString("PWSAMPLE", "Timer Set", " ", A$, 3, "CONTROL.INI")
  191. time_set.Text = A$
  192. If (RESULT% = 0) Then
  193.    time_set.Text = "1"
  194. End If
  195. End Sub
  196.  
  197. Sub Spin1_SpinDown ()
  198. time_set.Text = Str$(Val(time_set.Text) - 1)
  199. If (Val(time_set.Text) < 1) Then
  200.    time_set.Text = 1
  201. End If
  202. End Sub
  203.  
  204. Sub Spin1_SpinUp ()
  205. time_set.Text = Str$(Val(time_set.Text) + 1)
  206. End Sub
  207.  
  208.